<?php
    $account_type  = C('Common.account_type');
    $active_status = C('Common.active_status');
    $sex           = C('Common.sex');
?>
<body class="J_scroll_fixed">
<div class="wrap jj">
    <div class="nav">
        <ul class="cc">
            <li><a href="<?php echo U('Admin/Member/index'); ?>">用户管理</a></li>
            <li class="current"><a href="javascript:;">用户信息编辑</a></li>
        </ul>
    </div>
    
    <div class="pop_nav">
      <ul class="J_tabs_nav">
        <li class="current"><a href="javascript:;">用户信息</a></li>
        <li><a href="javascript:;">基本资料</a></li>
      </ul>
    </div>
    
    <form class="J_ajaxForm" data-role="list" action="<?php echo U('Admin/Member/edit'); ?>" method="post">
    <input type="hidden" name ="id" value="<?php echo $result['id']; ?>">
    <input type="hidden" name ="_modified_" value="<?php echo $result['modified']; ?>">
    <div class="J_tabs_contents">
        <div>
            <div class="h_a">用户信息</div>
            <div class="table_full">
              <table width="100%" class="table_form">
                <tr>
                  <th width="150">登录账号：</th>
                  <td width="400"><?php echo $result['account']; ?></td>
                  <td><div class="fun_tips">登录账号不可更改</div></td>
                </tr>
                <tr>
                  <th>头像设置：</th>
                  <td>
                    <div>
                        <img id="J_face_img" class="J_previewImg" data-type="thumb" width="120" height="120" src="<?php echo get_image_path($result['thumb_icon'],'thumb'); ?>">
                    </div>
                    <div class="single_image_up"><a href="">重新选择</a><input name="icon" type="file" class="J_upload_preview"></div>
                  </td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>登录密码：</th>
                  <td><input type="password" name="password" id="password" class="input length_3"></td>
                  <td><div class="fun_tips">如需更改密码请填写此项</div></td>
                </tr>
                <tr>
                  <th>绑定邮箱：</th>
                  <td><input type="text" name="email" id="email" class="input length_5" value="<?php echo $result['email']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>账号区分：</th>
                  <td>
                  <?php foreach($account_type as $key => $val): ?>
                      <input type="radio" name="account_type" value="<?php echo $key; ?>" id="account_type<?php echo $key; ?>"<?php if($result['account_type'] == $key) echo ' checked' ?>>
                      <label for="account_type<?php echo $key; ?>"><span><?php echo $val; ?></span></label>
                  <?php endforeach; ?>
                  </td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>账号角色：</th>
                  <td>
                    <?php echo select('role_id',$roles,$result['role_id'],null,array('class'=>'select_2')); ?>
                  </td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>账号状态：</th>
                  <td>
                  <?php foreach($active_status as $key => $val): ?>
                      <input type="radio" name="active_status" value="<?php echo $key; ?>" id="active_status<?php echo $key; ?>"<?php if($result['active_status'] == $key) echo ' checked' ?>>
                      <label for="active_status<?php echo $key; ?>"><span><?php echo $val; ?></span></label>
                  <?php endforeach; ?>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>注册日期：</th>
                  <td><input type="text" name="created" id="created" class="input J_datetime" value="<?php echo $result['created']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>注册IP地址：</th>
                  <td><?php echo $result['created_ip']; ?></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>最后更新日期：</th>
                  <td><?php echo $result['modified']; ?></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                </table>
             </div>
        </div>
        <div style="display:none">
            <div class="h_a">基本资料</div>
           <div class="table_full">
              <table width="100%" class="table_form">
                <tr>
                  <th width="150">昵称：</th>
                  <td width="400"><input type="text" name="nickname" id="nickname" class="input length_3" value="<?php echo $result['nickname']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>绑定手机：</th>
                  <td><input type="text" name="mobile" id="mobile" class="input length_3" value="<?php echo $result['mobile']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>性别：</th>
                  <td>
                  <?php foreach($sex as $key => $val): ?>
                      <input type="radio" name="sex" value="<?php echo $key; ?>" id="sex<?php echo $key; ?>"<?php if($result['sex'] == $key) echo ' checked' ?>>
                      <label for="sex<?php echo $key; ?>"><span><?php echo $val; ?></span></label>
                  <?php endforeach; ?>
                  </td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>所属账号：</th>
                  <td><input type="text" name="promotion_account" id="promotion_account" class="input length_3" value="<?php echo $result['promotion_account']; ?>"></td>
                  <td><div class="fun_tips">绑定推广员账号</div></td>
                </tr>
                <tr>
                  <th>出生年月：</th>
                  <td><input type="text" name="birthday" id="birthday" class="input w100 J_date" value="<?php echo $result['birthday']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>账号积分：</th>
                  <td><input type="text" name="integral" id="integral" class="input w100" value="<?php echo $result['integral']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                    <th>归属地</th>
                    <td class="J_region_set">
                        <span>
                        <span class="J_province"><?php echo $area['province']; ?></span>
                        <span class="J_city"><?php echo $area['city']; ?></span>
                        <span class="J_district"><?php echo $area['district']; ?></span>
                        </span>&nbsp;
                        <a data-pid="" data-cid="" data-did="" href="" class="J_region_change">更改归属地</a>
                        <input class="J_areaid" type="hidden" name="area_id" value="<?php echo $result['area_id']; ?>" />
                    </td>
                    <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>居住地址：</th>
                  <td><input type="text" name="address" id="address" class="input length_5" value="<?php echo $result['address']; ?>"></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                  <th>备注信息：</th>
                  <td><textarea class="length_5" name="remark"><?php echo $result['remark']; ?></textarea></td>
                  <td><div class="fun_tips"></div></td>
                </tr>
                </table>
             </div>
        </div>
    </div>
     
    <div class="btn_wrap">
       <div class="btn_wrap_pd">
          <button type="submit" class="btn btn_submit mr20 J_ajax_submit_btn" id="J_rights_form_btn">提交</button>
       </div>
    </div>

    </form>
</div>
<script>
Wind.use('region', function(){
    $('a.J_region_change').region();
});
</script>
</body>